﻿
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using Adalbertus.BudgetPlanner.Domain.CodeContracts;

namespace Adalbertus.BudgetPlanner.Domain.Repositories
{
    [ContractClass(typeof(IRepositoryContract<>))]
    public interface IRepository<TDomain>
    {
        TDomain GetById(int id);
        IEnumerable<TDomain> GetAll();

        void Save(TDomain entity);
        void Save(IEnumerable<TDomain> domains);
        void Remove(TDomain domain);
    }
}
